package com.cn.pg.service.impl;

import com.cn.pg.dao.ProductMapper;
import com.cn.pg.pojo.Product;
import com.cn.pg.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductServiceImpl implements ProductService {

    @Autowired
    private ProductMapper productMapper;

    public void findAllProductM() {
        // 查询Master
        List<Product> allProductM = productMapper.findAllProductM();
        System.out.println(allProductM);
    }

    public void findAllProductS() {
        // 查询Slave
        List<Product> allProductS = productMapper.findAllProductS();
        System.out.println(allProductS);
    }
}
